package com.warm.spring.ioc.expand;

import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

/**
 * @Description 自定义 BeanPostProcessor 实现 扩展 IOC
 * @Author iyb-liangchuang
 * @Date 2021/6/3 9:06
 */
@Component
public class InsBeanPostProcessorBean implements BeanPostProcessor {

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName){
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName){
        System.out.println(">>>>> Bean '" + beanName + "' created : " + bean.toString());
        return bean;
    }
}
